﻿using Adnc.Infra.Entities;
using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WYT.Usr.Repository.Entities
{
    /// <summary>
    /// 用户升级申请
    /// </summary>
    [Table("usr_userUpgradeApply"), Comment("用户升级申请"), Index(nameof(UserId))]
    public class UserUpgradeApply : EfEntity
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [Comment("用户ID")]
        public long UserId { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        [Comment("用户名称"),MaxLength(200)]
        public string UserName { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        [Comment("电话"), MaxLength(20)]
        public string Phone { get; set; }

        /// <summary>
        /// 当前等级
        /// </summary>
        [Comment("当前等级")]
        public int BeforeGrade { get; set; }

        /// <summary>
        /// 目标等级
        /// </summary>
        [Comment("目标等级")]
        public int TargetGrade { get; set; }

        /// <summary>
        /// <summary>
        /// 审核状态 1:待审核,2:审核通过,3,审核失败
        /// </summary>
        [Comment("审核状态 0:待审核,1:审核通过,-1,审核失败")]
        public int State { get; set; }

        /// <summary>
        /// 申请时间
        /// </summary>
        [Comment("申请时间")]
        public DateTime ApplyTime { get; set; }

        /// <summary>
        /// 收款金额
        /// </summary>
        [Comment("收款金额"), Column(TypeName = "decimal(18,2)")]
        public decimal ReceivableAmount { get; set; }

        /// <summary>
        /// 收款凭证
        /// </summary>
        [Comment("收款凭证")]
        public string PaymentVoucher { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Comment("备注")]
        public string? Remark { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        [Comment("审核人")]
        public long? Reviewer { get; set; }

        /// <summary>
        /// 审核时间
        /// </summary>
        [Comment("审核时间")]
        public DateTime? AuditTime { get; set; }
    }
}
